package servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import bean.traitement;

public class search  extends HttpServlet{

	traitement obj=new traitement();
	String view="/test.jsp";
	int i=0;
	public void doPost( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException
	{
		
		
		String mot = request.getParameter( "mot" );
		System.out.println(mot);
		//ajout du bean à l'objet requete
		obj.setMot(mot);
		request.setAttribute("mot",obj.getMot()); 
		this.getServletContext().getRequestDispatcher( view ).forward( request, response );
	}

}
